const state = {
    loading: false,
    loadText: '正在加载中',
    count: 0
}

const mutations = {
    UPDATE_LOAD (state, payload) {
        state.loading = payload
    },
    UPDATE_LOADTEXT (state, payload) {
        state.loadText = payload
    },
    UPDATE_COUNT (stage, payload) {
        stage.count = payload
    }
}

const actions = {
    SetCount ({ commit }, data) {
        commit('UPDATE_COUNT', data)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}
